{% extends 'blank.html.twig' %}
{% block pagecss %}
    <style type="text/css">
        .imagediv{
            width: 60px;
            height: 60px;
            /*overflow: hidden;*/
        }
        .imagediv .img{
            cursor: pointer;
            transition: all 0.6s;
        }
        .imagediv .img:hover{
            transform: scale(5);
        }
    </style>
{% endblock %}
{% block body %}
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 新闻管理 <span class="c-gray en">&gt;</span> 新闻列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive" >
                <thead>
                <tr>
                    <th>id</th>
                    <th>标题</th>
                    <th>缩略图</th>
                    <th>简略标题</th>
                    <th>分类栏目</th>
                    <th>文章摘要</th>
                    <th>允许评论</th>
                    <th>推荐头图</th>
                    <th>是否推荐</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for item in arrnews %}
                    <tr class="{{ cycle(['success','warning'],item.id) }}">
                        <th>{{ item.id }}</th>
                        <th>{{ item.title }}</th>
                        <th><div class="imagediv"><img  width="60" height="60" class="img picture-thumb" src="{{ item.image }}"></div></th>
                        <th>{{ item.smallTitle }}</th>
                        {% if item.caiid == 1 %}
                            <th>首页</th>
                        {% elseif item.caiid == 2 %}
                            <th>时政</th>
                        {% elseif item.caiid == 3 %}
                            <th>体育</th>
                        {% elseif item.caiid == 4 %}
                            <th>娱乐</th>
                        {% endif %}
                        <th>{{ item.description }}</th>
                        <th>{{ item.isAllowcomments }}</th>
                        <th>{{ item.isHeadFigure }}</th>
                        <th>{{ item.isposition }}</th>
                        <th></th>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
{% endblock %}